\(\int \frac {d+e x+f x^2+g x^3}{a+b x^n+c x^{2 n}} \, dx\) [5]

   Optimal result
   Rubi [A] (verified)
   Mathematica [B] (verified)
   Maple [F]
   Fricas [F]
   Sympy [F(-1)]
   Maxima [F]
   Giac [F]
   Mupad [F(-1)]

Optimal result

Integrand size = 32, antiderivative size = 545 \[ \int \frac {d+e x+f x^2+g x^3}{a+b x^n+c x^{2 n}} \, dx=-\frac {2 c d x \operatorname {Hypergeometric2F1}\left (1,\frac {1}{n},1+\frac {1}{n},-\frac {2 c x^n}{b-\sqrt {b^2-4 a c}}\right )}{b^2-4 a c-b \sqrt {b^2-4 a c}}-\frac {2 c d x \operatorname {Hypergeometric2F1}\left (1,\frac {1}{n},1+\frac {1}{n},-\frac {2 c x^n}{b+\sqrt {b^2-4 a c}}\right )}{b^2-4 a c+b \sqrt {b^2-4 a c}}-\frac {c e x^2 \operatorname {Hypergeometric2F1}\left (1,\frac {2}{n},\frac {2+n}{n},-\frac {2 c x^n}{b-\sqrt {b^2-4 a c}}\right )}{b^2-4 a c-b \sqrt {b^2-4 a c}}-\frac {c e x^2 \operatorname {Hypergeometric2F1}\left (1,\frac {2}{n},\frac {2+n}{n},-\frac {2 c x^n}{b+\sqrt {b^2-4 a c}}\right )}{b^2-4 a c+b \sqrt {b^2-4 a c}}-\frac {2 c f x^3 \operatorname {Hypergeometric2F1}\left (1,\frac {3}{n},\frac {3+n}{n},-\frac {2 c x^n}{b-\sqrt {b^2-4 a c}}\right )}{3 \left (b^2-4 a c-b \sqrt {b^2-4 a c}\right )}-\frac {2 c f x^3 \operatorname {Hypergeometric2F1}\left (1,\frac {3}{n},\frac {3+n}{n},-\frac {2 c x^n}{b+\sqrt {b^2-4 a c}}\right )}{3 \left (b^2-4 a c+b \sqrt {b^2-4 a c}\right )}-\frac {c g x^4 \operatorname {Hypergeometric2F1}\left (1,\frac {4}{n},\frac {4+n}{n},-\frac {2 c x^n}{b-\sqrt {b^2-4 a c}}\right )}{2 \left (b^2-4 a c-b \sqrt {b^2-4 a c}\right )}-\frac {c g x^4 \operatorname {Hypergeometric2F1}\left (1,\frac {4}{n},\frac {4+n}{n},-\frac {2 c x^n}{b+\sqrt {b^2-4 a c}}\right )}{2 \left (b^2-4 a c+b \sqrt {b^2-4 a c}\right )} \]

[Out]

-2*c*d*x*hypergeom([1, 1/n],[1+1/n],-2*c*x^n/(b-(-4*a*c+b^2)^(1/2)))/(b^2-4*a*c-b*(-4*a*c+b^2)^(1/2))-c*e*x^2*
hypergeom([1, 2/n],[(2+n)/n],-2*c*x^n/(b-(-4*a*c+b^2)^(1/2)))/(b^2-4*a*c-b*(-4*a*c+b^2)^(1/2))-2/3*c*f*x^3*hyp
ergeom([1, 3/n],[(3+n)/n],-2*c*x^n/(b-(-4*a*c+b^2)^(1/2)))/(b^2-4*a*c-b*(-4*a*c+b^2)^(1/2))-1/2*c*g*x^4*hyperg
eom([1, 4/n],[(4+n)/n],-2*c*x^n/(b-(-4*a*c+b^2)^(1/2)))/(b^2-4*a*c-b*(-4*a*c+b^2)^(1/2))-2*c*d*x*hypergeom([1,
 1/n],[1+1/n],-2*c*x^n/(b+(-4*a*c+b^2)^(1/2)))/(b^2-4*a*c+b*(-4*a*c+b^2)^(1/2))-c*e*x^2*hypergeom([1, 2/n],[(2
+n)/n],-2*c*x^n/(b+(-4*a*c+b^2)^(1/2)))/(b^2-4*a*c+b*(-4*a*c+b^2)^(1/2))-2/3*c*f*x^3*hypergeom([1, 3/n],[(3+n)
/n],-2*c*x^n/(b+(-4*a*c+b^2)^(1/2)))/(b^2-4*a*c+b*(-4*a*c+b^2)^(1/2))-1/2*c*g*x^4*hypergeom([1, 4/n],[(4+n)/n]
,-2*c*x^n/(b+(-4*a*c+b^2)^(1/2)))/(b^2-4*a*c+b*(-4*a*c+b^2)^(1/2))

Rubi [A] (verified)

Time = 0.24 (sec) , antiderivative size = 545, normalized size of antiderivative = 1.00, number of steps used = 13, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {1807, 1907, 251, 371} \[ \int \frac {d+e x+f x^2+g x^3}{a+b x^n+c x^{2 n}} \, dx=-\frac {2 c d x \operatorname {Hypergeometric2F1}\left (1,\frac {1}{n},1+\frac {1}{n},-\frac {2 c x^n}{b-\sqrt {b^2-4 a c}}\right )}{-b \sqrt {b^2-4 a c}-4 a c+b^2}-\frac {2 c d x \operatorname {Hypergeometric2F1}\left (1,\frac {1}{n},1+\frac {1}{n},-\frac {2 c x^n}{b+\sqrt {b^2-4 a c}}\right )}{b \sqrt {b^2-4 a c}-4 a c+b^2}-\frac {c e x^2 \operatorname {Hypergeometric2F1}\left (1,\frac {2}{n},\frac {n+2}{n},-\frac {2 c x^n}{b-\sqrt {b^2-4 a c}}\right )}{-b \sqrt {b^2-4 a c}-4 a c+b^2}-\frac {c e x^2 \operatorname {Hypergeometric2F1}\left (1,\frac {2}{n},\frac {n+2}{n},-\frac {2 c x^n}{b+\sqrt {b^2-4 a c}}\right )}{b \sqrt {b^2-4 a c}-4 a c+b^2}-\frac {2 c f x^3 \operatorname {Hypergeometric2F1}\left (1,\frac {3}{n},\frac {n+3}{n},-\frac {2 c x^n}{b-\sqrt {b^2-4 a c}}\right )}{3 \left (-b \sqrt {b^2-4 a c}-4 a c+b^2\right )}-\frac {2 c f x^3 \operatorname {Hypergeometric2F1}\left (1,\frac {3}{n},\frac {n+3}{n},-\frac {2 c x^n}{b+\sqrt {b^2-4 a c}}\right )}{3 \left (b \sqrt {b^2-4 a c}-4 a c+b^2\right )}-\frac {c g x^4 \operatorname {Hypergeometric2F1}\left (1,\frac {4}{n},\frac {n+4}{n},-\frac {2 c x^n}{b-\sqrt {b^2-4 a c}}\right )}{2 \left (-b \sqrt {b^2-4 a c}-4 a c+b^2\right )}-\frac {c g x^4 \operatorname {Hypergeometric2F1}\left (1,\frac {4}{n},\frac {n+4}{n},-\frac {2 c x^n}{b+\sqrt {b^2-4 a c}}\right )}{2 \left (b \sqrt {b^2-4 a c}-4 a c+b^2\right )} \]

[In]

Int[(d + e*x + f*x^2 + g*x^3)/(a + b*x^n + c*x^(2*n)),x]

[Out]

(-2*c*d*x*Hypergeometric2F1[1, n^(-1), 1 + n^(-1), (-2*c*x^n)/(b - Sqrt[b^2 - 4*a*c])])/(b^2 - 4*a*c - b*Sqrt[
b^2 - 4*a*c]) - (2*c*d*x*Hypergeometric2F1[1, n^(-1), 1 + n^(-1), (-2*c*x^n)/(b + Sqrt[b^2 - 4*a*c])])/(b^2 -
4*a*c + b*Sqrt[b^2 - 4*a*c]) - (c*e*x^2*Hypergeometric2F1[1, 2/n, (2 + n)/n, (-2*c*x^n)/(b - Sqrt[b^2 - 4*a*c]
)])/(b^2 - 4*a*c - b*Sqrt[b^2 - 4*a*c]) - (c*e*x^2*Hypergeometric2F1[1, 2/n, (2 + n)/n, (-2*c*x^n)/(b + Sqrt[b
^2 - 4*a*c])])/(b^2 - 4*a*c + b*Sqrt[b^2 - 4*a*c]) - (2*c*f*x^3*Hypergeometric2F1[1, 3/n, (3 + n)/n, (-2*c*x^n
)/(b - Sqrt[b^2 - 4*a*c])])/(3*(b^2 - 4*a*c - b*Sqrt[b^2 - 4*a*c])) - (2*c*f*x^3*Hypergeometric2F1[1, 3/n, (3
+ n)/n, (-2*c*x^n)/(b + Sqrt[b^2 - 4*a*c])])/(3*(b^2 - 4*a*c + b*Sqrt[b^2 - 4*a*c])) - (c*g*x^4*Hypergeometric
2F1[1, 4/n, (4 + n)/n, (-2*c*x^n)/(b - Sqrt[b^2 - 4*a*c])])/(2*(b^2 - 4*a*c - b*Sqrt[b^2 - 4*a*c])) - (c*g*x^4
*Hypergeometric2F1[1, 4/n, (4 + n)/n, (-2*c*x^n)/(b + Sqrt[b^2 - 4*a*c])])/(2*(b^2 - 4*a*c + b*Sqrt[b^2 - 4*a*
c]))

Rule 251

Int[((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[a^p*x*Hypergeometric2F1[-p, 1/n, 1/n + 1, (-b)*(x^n/a)],
x] /; FreeQ[{a, b, n, p}, x] &&  !IGtQ[p, 0] &&  !IntegerQ[1/n] &&  !ILtQ[Simplify[1/n + p], 0] && (IntegerQ[p
] || GtQ[a, 0])

Rule 371

Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[a^p*((c*x)^(m + 1)/(c*(m + 1)))*Hyperg
eometric2F1[-p, (m + 1)/n, (m + 1)/n + 1, (-b)*(x^n/a)], x] /; FreeQ[{a, b, c, m, n, p}, x] &&  !IGtQ[p, 0] &&
 (ILtQ[p, 0] || GtQ[a, 0])

Rule 1807

Int[(Pq_)/((a_) + (b_.)*(x_)^(n_.) + (c_.)*(x_)^(n2_.)), x_Symbol] :> With[{q = Rt[b^2 - 4*a*c, 2]}, Dist[2*(c
/q), Int[Pq/(b - q + 2*c*x^n), x], x] - Dist[2*(c/q), Int[Pq/(b + q + 2*c*x^n), x], x]] /; FreeQ[{a, b, c, n},
 x] && EqQ[n2, 2*n] && PolyQ[Pq, x] && NeQ[b^2 - 4*a*c, 0]

Rule 1907

Int[(Pq_)*((a_) + (b_.)*(x_)^(n_))^(p_.), x_Symbol] :> Int[ExpandIntegrand[Pq*(a + b*x^n)^p, x], x] /; FreeQ[{
a, b, n, p}, x] && (PolyQ[Pq, x] || PolyQ[Pq, x^n])

Rubi steps \begin{align*} \text {integral}& = \frac {(2 c) \int \frac {d+e x+f x^2+g x^3}{b-\sqrt {b^2-4 a c}+2 c x^n} \, dx}{\sqrt {b^2-4 a c}}-\frac {(2 c) \int \frac {d+e x+f x^2+g x^3}{b+\sqrt {b^2-4 a c}+2 c x^n} \, dx}{\sqrt {b^2-4 a c}} \\ & = \frac {(2 c) \int \left (-\frac {d}{-b+\sqrt {b^2-4 a c}-2 c x^n}-\frac {e x}{-b+\sqrt {b^2-4 a c}-2 c x^n}-\frac {f x^2}{-b+\sqrt {b^2-4 a c}-2 c x^n}-\frac {g x^3}{-b+\sqrt {b^2-4 a c}-2 c x^n}\right ) \, dx}{\sqrt {b^2-4 a c}}-\frac {(2 c) \int \left (\frac {d}{b+\sqrt {b^2-4 a c}+2 c x^n}+\frac {e x}{b+\sqrt {b^2-4 a c}+2 c x^n}+\frac {f x^2}{b+\sqrt {b^2-4 a c}+2 c x^n}+\frac {g x^3}{b+\sqrt {b^2-4 a c}+2 c x^n}\right ) \, dx}{\sqrt {b^2-4 a c}} \\ & = -\frac {(2 c d) \int \frac {1}{-b+\sqrt {b^2-4 a c}-2 c x^n} \, dx}{\sqrt {b^2-4 a c}}-\frac {(2 c d) \int \frac {1}{b+\sqrt {b^2-4 a c}+2 c x^n} \, dx}{\sqrt {b^2-4 a c}}-\frac {(2 c e) \int \frac {x}{-b+\sqrt {b^2-4 a c}-2 c x^n} \, dx}{\sqrt {b^2-4 a c}}-\frac {(2 c e) \int \frac {x}{b+\sqrt {b^2-4 a c}+2 c x^n} \, dx}{\sqrt {b^2-4 a c}}-\frac {(2 c f) \int \frac {x^2}{-b+\sqrt {b^2-4 a c}-2 c x^n} \, dx}{\sqrt {b^2-4 a c}}-\frac {(2 c f) \int \frac {x^2}{b+\sqrt {b^2-4 a c}+2 c x^n} \, dx}{\sqrt {b^2-4 a c}}-\frac {(2 c g) \int \frac {x^3}{-b+\sqrt {b^2-4 a c}-2 c x^n} \, dx}{\sqrt {b^2-4 a c}}-\frac {(2 c g) \int \frac {x^3}{b+\sqrt {b^2-4 a c}+2 c x^n} \, dx}{\sqrt {b^2-4 a c}} \\ & = -\frac {2 c d x \, _2F_1\left (1,\frac {1}{n};1+\frac {1}{n};-\frac {2 c x^n}{b-\sqrt {b^2-4 a c}}\right )}{b^2-4 a c-b \sqrt {b^2-4 a c}}-\frac {2 c d x \, _2F_1\left (1,\frac {1}{n};1+\frac {1}{n};-\frac {2 c x^n}{b+\sqrt {b^2-4 a c}}\right )}{b^2-4 a c+b \sqrt {b^2-4 a c}}-\frac {c e x^2 \, _2F_1\left (1,\frac {2}{n};\frac {2+n}{n};-\frac {2 c x^n}{b-\sqrt {b^2-4 a c}}\right )}{b^2-4 a c-b \sqrt {b^2-4 a c}}-\frac {c e x^2 \, _2F_1\left (1,\frac {2}{n};\frac {2+n}{n};-\frac {2 c x^n}{b+\sqrt {b^2-4 a c}}\right )}{b^2-4 a c+b \sqrt {b^2-4 a c}}-\frac {2 c f x^3 \, _2F_1\left (1,\frac {3}{n};\frac {3+n}{n};-\frac {2 c x^n}{b-\sqrt {b^2-4 a c}}\right )}{3 \left (b^2-4 a c-b \sqrt {b^2-4 a c}\right )}-\frac {2 c f x^3 \, _2F_1\left (1,\frac {3}{n};\frac {3+n}{n};-\frac {2 c x^n}{b+\sqrt {b^2-4 a c}}\right )}{3 \left (b^2-4 a c+b \sqrt {b^2-4 a c}\right )}-\frac {c g x^4 \, _2F_1\left (1,\frac {4}{n};\frac {4+n}{n};-\frac {2 c x^n}{b-\sqrt {b^2-4 a c}}\right )}{2 \left (b^2-4 a c-b \sqrt {b^2-4 a c}\right )}-\frac {c g x^4 \, _2F_1\left (1,\frac {4}{n};\frac {4+n}{n};-\frac {2 c x^n}{b+\sqrt {b^2-4 a c}}\right )}{2 \left (b^2-4 a c+b \sqrt {b^2-4 a c}\right )} \\ \end{align*}

Mathematica [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(1093\) vs. \(2(545)=1090\).

Time = 1.28 (sec) , antiderivative size = 1093, normalized size of antiderivative = 2.01 \[ \int \frac {d+e x+f x^2+g x^3}{a+b x^n+c x^{2 n}} \, dx=\frac {x \left (3 g x^3 \left (\left (-b^2+4 a c-b \sqrt {b^2-4 a c}\right ) \left (1-\left (\frac {x^n}{-\frac {-b+\sqrt {b^2-4 a c}}{2 c}+x^n}\right )^{-4/n} \operatorname {Hypergeometric2F1}\left (-\frac {4}{n},-\frac {4}{n},\frac {-4+n}{n},\frac {b-\sqrt {b^2-4 a c}}{b-\sqrt {b^2-4 a c}+2 c x^n}\right )\right )+\left (-b^2+4 a c+b \sqrt {b^2-4 a c}\right ) \left (1-2^{-4/n} \left (\frac {c x^n}{b+\sqrt {b^2-4 a c}+2 c x^n}\right )^{-4/n} \operatorname {Hypergeometric2F1}\left (-\frac {4}{n},-\frac {4}{n},\frac {-4+n}{n},\frac {b+\sqrt {b^2-4 a c}}{b+\sqrt {b^2-4 a c}+2 c x^n}\right )\right )\right )+4 f x^2 \left (\left (-b^2+4 a c-b \sqrt {b^2-4 a c}\right ) \left (1-\left (\frac {x^n}{-\frac {-b+\sqrt {b^2-4 a c}}{2 c}+x^n}\right )^{-3/n} \operatorname {Hypergeometric2F1}\left (-\frac {3}{n},-\frac {3}{n},\frac {-3+n}{n},\frac {b-\sqrt {b^2-4 a c}}{b-\sqrt {b^2-4 a c}+2 c x^n}\right )\right )+\left (-b^2+4 a c+b \sqrt {b^2-4 a c}\right ) \left (1-8^{-1/n} \left (\frac {c x^n}{b+\sqrt {b^2-4 a c}+2 c x^n}\right )^{-3/n} \operatorname {Hypergeometric2F1}\left (-\frac {3}{n},-\frac {3}{n},\frac {-3+n}{n},\frac {b+\sqrt {b^2-4 a c}}{b+\sqrt {b^2-4 a c}+2 c x^n}\right )\right )\right )+6 e x \left (\left (-b^2+4 a c-b \sqrt {b^2-4 a c}\right ) \left (1-\left (\frac {x^n}{-\frac {-b+\sqrt {b^2-4 a c}}{2 c}+x^n}\right )^{-2/n} \operatorname {Hypergeometric2F1}\left (-\frac {2}{n},-\frac {2}{n},\frac {-2+n}{n},\frac {b-\sqrt {b^2-4 a c}}{b-\sqrt {b^2-4 a c}+2 c x^n}\right )\right )+\left (-b^2+4 a c+b \sqrt {b^2-4 a c}\right ) \left (1-4^{-1/n} \left (\frac {c x^n}{b+\sqrt {b^2-4 a c}+2 c x^n}\right )^{-2/n} \operatorname {Hypergeometric2F1}\left (-\frac {2}{n},-\frac {2}{n},\frac {-2+n}{n},\frac {b+\sqrt {b^2-4 a c}}{b+\sqrt {b^2-4 a c}+2 c x^n}\right )\right )\right )+12 d \left (\left (-b^2+4 a c-b \sqrt {b^2-4 a c}\right ) \left (1-\left (\frac {x^n}{-\frac {-b+\sqrt {b^2-4 a c}}{2 c}+x^n}\right )^{-1/n} \operatorname {Hypergeometric2F1}\left (-\frac {1}{n},-\frac {1}{n},\frac {-1+n}{n},\frac {b-\sqrt {b^2-4 a c}}{b-\sqrt {b^2-4 a c}+2 c x^n}\right )\right )-2^{-1/n} \sqrt {b^2-4 a c} \left (-b+\sqrt {b^2-4 a c}\right ) \left (\frac {c x^n}{b+\sqrt {b^2-4 a c}+2 c x^n}\right )^{-1/n} \left (2^{\frac {1}{n}} \left (\frac {c x^n}{b+\sqrt {b^2-4 a c}+2 c x^n}\right )^{\frac {1}{n}}-\operatorname {Hypergeometric2F1}\left (-\frac {1}{n},-\frac {1}{n},\frac {-1+n}{n},\frac {b+\sqrt {b^2-4 a c}}{b+\sqrt {b^2-4 a c}+2 c x^n}\right )\right )\right )\right )}{24 a \left (-b^2+4 a c\right )} \]

[In]

Integrate[(d + e*x + f*x^2 + g*x^3)/(a + b*x^n + c*x^(2*n)),x]

[Out]

(x*(3*g*x^3*((-b^2 + 4*a*c - b*Sqrt[b^2 - 4*a*c])*(1 - Hypergeometric2F1[-4/n, -4/n, (-4 + n)/n, (b - Sqrt[b^2
 - 4*a*c])/(b - Sqrt[b^2 - 4*a*c] + 2*c*x^n)]/(x^n/(-1/2*(-b + Sqrt[b^2 - 4*a*c])/c + x^n))^(4/n)) + (-b^2 + 4
*a*c + b*Sqrt[b^2 - 4*a*c])*(1 - Hypergeometric2F1[-4/n, -4/n, (-4 + n)/n, (b + Sqrt[b^2 - 4*a*c])/(b + Sqrt[b
^2 - 4*a*c] + 2*c*x^n)]/(2^(4/n)*((c*x^n)/(b + Sqrt[b^2 - 4*a*c] + 2*c*x^n))^(4/n)))) + 4*f*x^2*((-b^2 + 4*a*c
 - b*Sqrt[b^2 - 4*a*c])*(1 - Hypergeometric2F1[-3/n, -3/n, (-3 + n)/n, (b - Sqrt[b^2 - 4*a*c])/(b - Sqrt[b^2 -
 4*a*c] + 2*c*x^n)]/(x^n/(-1/2*(-b + Sqrt[b^2 - 4*a*c])/c + x^n))^(3/n)) + (-b^2 + 4*a*c + b*Sqrt[b^2 - 4*a*c]
)*(1 - Hypergeometric2F1[-3/n, -3/n, (-3 + n)/n, (b + Sqrt[b^2 - 4*a*c])/(b + Sqrt[b^2 - 4*a*c] + 2*c*x^n)]/(8
^n^(-1)*((c*x^n)/(b + Sqrt[b^2 - 4*a*c] + 2*c*x^n))^(3/n)))) + 6*e*x*((-b^2 + 4*a*c - b*Sqrt[b^2 - 4*a*c])*(1
- Hypergeometric2F1[-2/n, -2/n, (-2 + n)/n, (b - Sqrt[b^2 - 4*a*c])/(b - Sqrt[b^2 - 4*a*c] + 2*c*x^n)]/(x^n/(-
1/2*(-b + Sqrt[b^2 - 4*a*c])/c + x^n))^(2/n)) + (-b^2 + 4*a*c + b*Sqrt[b^2 - 4*a*c])*(1 - Hypergeometric2F1[-2
/n, -2/n, (-2 + n)/n, (b + Sqrt[b^2 - 4*a*c])/(b + Sqrt[b^2 - 4*a*c] + 2*c*x^n)]/(4^n^(-1)*((c*x^n)/(b + Sqrt[
b^2 - 4*a*c] + 2*c*x^n))^(2/n)))) + 12*d*((-b^2 + 4*a*c - b*Sqrt[b^2 - 4*a*c])*(1 - Hypergeometric2F1[-n^(-1),
 -n^(-1), (-1 + n)/n, (b - Sqrt[b^2 - 4*a*c])/(b - Sqrt[b^2 - 4*a*c] + 2*c*x^n)]/(x^n/(-1/2*(-b + Sqrt[b^2 - 4
*a*c])/c + x^n))^n^(-1)) - (Sqrt[b^2 - 4*a*c]*(-b + Sqrt[b^2 - 4*a*c])*(2^n^(-1)*((c*x^n)/(b + Sqrt[b^2 - 4*a*
c] + 2*c*x^n))^n^(-1) - Hypergeometric2F1[-n^(-1), -n^(-1), (-1 + n)/n, (b + Sqrt[b^2 - 4*a*c])/(b + Sqrt[b^2
- 4*a*c] + 2*c*x^n)]))/(2^n^(-1)*((c*x^n)/(b + Sqrt[b^2 - 4*a*c] + 2*c*x^n))^n^(-1)))))/(24*a*(-b^2 + 4*a*c))

Maple [F]

\[\int \frac {g \,x^{3}+f \,x^{2}+e x +d}{a +b \,x^{n}+c \,x^{2 n}}d x\]

[In]

int((g*x^3+f*x^2+e*x+d)/(a+b*x^n+c*x^(2*n)),x)

[Out]

int((g*x^3+f*x^2+e*x+d)/(a+b*x^n+c*x^(2*n)),x)

Fricas [F]

\[ \int \frac {d+e x+f x^2+g x^3}{a+b x^n+c x^{2 n}} \, dx=\int { \frac {g x^{3} + f x^{2} + e x + d}{c x^{2 \, n} + b x^{n} + a} \,d x } \]

[In]

integrate((g*x^3+f*x^2+e*x+d)/(a+b*x^n+c*x^(2*n)),x, algorithm="fricas")

[Out]

integral((g*x^3 + f*x^2 + e*x + d)/(c*x^(2*n) + b*x^n + a), x)

Sympy [F(-1)]

Timed out. \[ \int \frac {d+e x+f x^2+g x^3}{a+b x^n+c x^{2 n}} \, dx=\text {Timed out} \]

[In]

integrate((g*x**3+f*x**2+e*x+d)/(a+b*x**n+c*x**(2*n)),x)

[Out]

Timed out

Maxima [F]

\[ \int \frac {d+e x+f x^2+g x^3}{a+b x^n+c x^{2 n}} \, dx=\int { \frac {g x^{3} + f x^{2} + e x + d}{c x^{2 \, n} + b x^{n} + a} \,d x } \]

[In]

integrate((g*x^3+f*x^2+e*x+d)/(a+b*x^n+c*x^(2*n)),x, algorithm="maxima")

[Out]

integrate((g*x^3 + f*x^2 + e*x + d)/(c*x^(2*n) + b*x^n + a), x)

Giac [F]

\[ \int \frac {d+e x+f x^2+g x^3}{a+b x^n+c x^{2 n}} \, dx=\int { \frac {g x^{3} + f x^{2} + e x + d}{c x^{2 \, n} + b x^{n} + a} \,d x } \]

[In]

integrate((g*x^3+f*x^2+e*x+d)/(a+b*x^n+c*x^(2*n)),x, algorithm="giac")

[Out]

integrate((g*x^3 + f*x^2 + e*x + d)/(c*x^(2*n) + b*x^n + a), x)

Mupad [F(-1)]

Timed out. \[ \int \frac {d+e x+f x^2+g x^3}{a+b x^n+c x^{2 n}} \, dx=\int \frac {g\,x^3+f\,x^2+e\,x+d}{a+b\,x^n+c\,x^{2\,n}} \,d x \]

[In]

int((d + e*x + f*x^2 + g*x^3)/(a + b*x^n + c*x^(2*n)),x)

[Out]

int((d + e*x + f*x^2 + g*x^3)/(a + b*x^n + c*x^(2*n)), x)